<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<meta charset="utf-8">
	<th:block th:include="include/src :: form_base_js_and_css"/>
</head>
<body>
<form class="layui-form">
	<!-- 顶部【start】 -->
	<div class="margin_2_0 height_56 line_height_56 width_percent_100 z_index_1000" id="id_header_1717075211915">
		<div class="bg_color_white height_56 left_0 line_height_56 position_fixed top_0 width_percent_100 z_index_1000">
			<div class="layui-inline" style="margin-left: 10px; vertical-align: middle; height: 56px; line-height: 56px; padding: 2px 0;">
				<button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" data-id="id_btn_save"><i class="iconfont icon-save"></i>保存</button>
			</div>
		</div>
	</div>
	<!-- 顶部【end】 -->
	<!-- 中间【start】 -->
	<div class="height_percent_100 margin_2_0 padding_2_0 width_percent_100" style="max-height: calc(100vh - 100px); overflow: unset;">
		<div id="id_form_1717075211915" style="background-color: #ffffff; overflow: unset;">
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">菜单ID：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="id" th:value="${dto.id}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30 cannot_edit" disabled="">
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>菜单名称：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="name" th:value="${dto.name}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
					</div>
				</div>
			</div>
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>前台页面的相关设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>权限名称：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="nameShiroAuth" th:value="${dto.nameShiroAuth}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不设置，则任意填写，如：#</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>前台模板类型：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<select name="templetType">
							<option th:each="templetType: ${dto.templetTypeArr}" th:value="${templetType.value}" th:text="${templetType.name}" th:selected="${templetType.selected}"></option>
						</select>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">自定义地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text"  name="pathSelfDefine" th:value="${dto.pathSelfDefine}" autocomplete="off" class="layui-input height_30 height_30">
						<span>前台模板类型为自定义时才填写</span>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>前台请求地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text"  name="pathGridRequest" th:value="${dto.pathGridRequest}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>此处为表格上数据的请求路径，如：/api/inter/xxxxxxxxx/search</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>前台编辑地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathGridEditRequest" th:value="${dto.pathGridEditRequest}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>导出请求地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathGridExportRequest" th:value="${dto.pathGridExportRequest}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>此处为表格上数据的导出路径，如：/api/inter/xxxxxxxxx/export</span>
					</div>
				</div>
			</div>
			
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>表单页面的相关设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>表单新增提交地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathCommitAdd" th:value="${dto.pathCommitAdd}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>表单编辑提交地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathCommitEdit" th:value="${dto.pathCommitEdit}" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>表单删除提交地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathCommitDelete" th:value="${dto.pathCommitDelete}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">单号头：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="preCode" th:value="${dto.preCode}" autocomplete="off" class="layui-input height_30 height_30">
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">连接符：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="connectCode" th:value="${dto.connectCode}" autocomplete="off" class="layui-input height_30 height_30">
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>单号起始值：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="startNo" th:value="${dto.startNo}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则填写0</span>
					</div>
				</div>
			</div>
			
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>流程的相关设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">流程模型：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<select name="flowModelId">
							<option th:each="flowModel: ${dto.flowModelArr}" th:value="${flowModel.value}" th:text="${flowModel.name}" th:selected="${flowModel.selected}"></option>
						</select>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>审批流转地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathFlowPass" th:value="${dto.pathFlowPass}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>审批退回地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathFlowRefuse" th:value="${dto.pathFlowRefuse}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10"><font class="f_red">*</font>审批驳回地址：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<input type="text" name="pathFlowInit" th:value="${dto.pathFlowInit}" autocomplete="off" lay-verify="required" class="layui-input height_30 height_30">
						<span>若不需要，则随便填写如 xxxxx</span>
					</div>
				</div>
			</div>
			
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>表单子列表的相关设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">子列表：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<select name="gridId">
							<option value="0">无</option>
							<option th:each="grid: ${dto.gridArr}" th:value="${grid.value}" th:text="${grid.name}" th:selected="${grid.selected}"></option>
						</select>
					</div>
				</div>
			</div>
			
			<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
				<legend>行单击列表的相关设置</legend>
			</fieldset>
			<div class="layui-form-item">
				<div class="layui-inline layui-col-xs4 margin_r_0">
					<label class="layui-form-label padding_6_0 width_160 margin_0_0_0_N10">行单击列表：</label>
					<div class="layui-input-block margin_l_150 min_height_38">
						<select name="rowClickGridId">
							<option th:each="rowClickGrid: ${dto.rowClickGridArr}" th:value="${rowClickGrid.value}" th:text="${rowClickGrid.name}" th:selected="${rowClickGrid.selected}"></option>
						</select>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 中间【end】 -->
</form>
<script>
$(function () {
	layui.use(['form'], function(){
		var form = layui.form;
		
		// 表单提交，共用同一个
		form.on('submit(formSubmit)', function(data){
			var indexOfLoading = layer.load(1, {
				shade: [0.5,'#000000'] //0.1透明度的白色背景
			});
			$.post('/api/inter/ysMenu/settingBase', data.field, function(res){
				if (res.code == 0) {
					layer.msg(res.msg);
					setTimeout(function(){
						window.parent.location.reload();
					}, 1000);
				} else {
					layer.close(indexOfLoading);
					layer.msg(res.msg);
				}
			});
			return false;
		});
	});
});
</script>

</body>
</html>
